package com.yunhe.portal.service;
import com.yunhe.common.exception.ArgumentErrorException;
import com.yunhe.common.model.mybatis.PageResult;
import com.yunhe.portal.domain.DataNewsInfo;
import com.yunhe.portal.model.NewsInfoQueryCondition;
import com.yunhe.portal.model.PhoneQueryCondition;
import com.yunhe.portal.model.PublishStatus;

/**
 * @description 新闻表
 * @author misty
 * @date 2021-10-19
 */
public interface DataNewsInfoService {

    /**
     * 新增
     */
    public void createDataNewsInfo (DataNewsInfo dataNewsInfo) throws ArgumentErrorException;

    /**
     * 删除
     */
    public int deleteDataNewsInfo(int id);

    /**
     * 更新
     */
    public int updateDataNewsInfo(DataNewsInfo dataNewsInfo) throws ArgumentErrorException;

    /**
     * 根据主键 id 查询
     */
    public DataNewsInfo findDataNewsInfoById(int id);


    /**
     * web根据条件查询新闻列表
     * @param newsInfoQueryCondition
     * @return
     */
    PageResult findDataNewsInfoByCondition(NewsInfoQueryCondition newsInfoQueryCondition);

    void setTop(long id) throws ArgumentErrorException;

    void setPublishStatus(PublishStatus publishStatus) throws ArgumentErrorException;

    void publishTimedNews();

    PageResult findAppNews(PhoneQueryCondition phoneQueryCondition);

    PageResult findWeChatNews(PhoneQueryCondition phoneQueryCondition);
}